<template>
	<view class="add" :style="{'top':marTop}">
		<text>对方开启了朋友验证，验证通过后才能聊天</text>
		<text class="add-text" @click="sendAddUser">添加好友</text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				//`calc(${scrollHeight + 'px'}  - var(--status-bar-height))`
				marTop: `calc(44px + var(--status-bar-height))`
			}
		},
		methods: {
			sendAddUser() {
				this.$emit('sendAddUser')
			}
		},
		mounted() {
			// #ifdef APP-PLUS
			this.marTop = 0
			// #endif
		}
	}
</script>

<style lang="scss" scoped>
	.add {
		position: fixed;
		z-index: 999;
		width: 100%;
		// height: 100rpx;
		background-color: rgba(246, 246, 246, 1);
		//background-color: rgba(0, 0, 0, 0.1);
		//top: calc(44px + var(--status-bar-height));
		padding: 20rpx 0;

		text {
			font-size: 28rpx;
			padding: 20rpx;
		}

		.add-text {
			color: lightblue;
		}
	}
</style>